package com.TIEmulator;

import android.app.Activity;
import java.io.Closeable;
import java.io.IOException;

class AssetHTMLView
{
  protected static void closeStream(Closeable paramCloseable)
  {
    if (paramCloseable != null);
    try
    {
      paramCloseable.close();
      return;
    }
    catch (IOException localIOException)
    {
    }
  }

  // ERROR //
  protected static android.webkit.WebView readFile(Activity paramActivity, java.lang.String paramString)
  {
    // Byte code:
    //   0: aconst_null
    //   1: astore_2
    //   2: new 25	java/io/BufferedReader
    //   5: dup
    //   6: new 27	java/io/InputStreamReader
    //   9: dup
    //   10: aload_0
    //   11: invokevirtual 33	android/app/Activity:getAssets	()Landroid/content/res/AssetManager;
    //   14: aload_1
    //   15: invokevirtual 39	android/content/res/AssetManager:open	(Ljava/lang/String;)Ljava/io/InputStream;
    //   18: invokespecial 42	java/io/InputStreamReader:<init>	(Ljava/io/InputStream;)V
    //   21: invokespecial 45	java/io/BufferedReader:<init>	(Ljava/io/Reader;)V
    //   24: astore_3
    //   25: new 47	java/lang/StringBuilder
    //   28: dup
    //   29: invokespecial 48	java/lang/StringBuilder:<init>	()V
    //   32: astore 4
    //   34: aload_3
    //   35: invokevirtual 52	java/io/BufferedReader:readLine	()Ljava/lang/String;
    //   38: astore 8
    //   40: aload 8
    //   42: ifnonnull +44 -> 86
    //   45: new 54	android/webkit/WebView
    //   48: dup
    //   49: aload_0
    //   50: invokespecial 57	android/webkit/WebView:<init>	(Landroid/content/Context;)V
    //   53: astore 9
    //   55: aload 9
    //   57: aload 4
    //   59: invokevirtual 60	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   62: ldc 62
    //   64: ldc 64
    //   66: invokevirtual 68	android/webkit/WebView:loadData	(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    //   69: aload 9
    //   71: iconst_0
    //   72: invokevirtual 72	android/webkit/WebView:setBackgroundColor	(I)V
    //   75: aload_3
    //   76: invokestatic 74	com/TIEmulator/AssetHTMLView:closeStream	(Ljava/io/Closeable;)V
    //   79: aload 9
    //   81: astore 7
    //   83: aload 7
    //   85: areturn
    //   86: aload 4
    //   88: aload 8
    //   90: invokevirtual 78	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   93: bipush 10
    //   95: invokevirtual 81	java/lang/StringBuilder:append	(C)Ljava/lang/StringBuilder;
    //   98: pop
    //   99: goto -65 -> 34
    //   102: astore 6
    //   104: aload_3
    //   105: astore_2
    //   106: aconst_null
    //   107: astore 7
    //   109: aload_2
    //   110: invokestatic 74	com/TIEmulator/AssetHTMLView:closeStream	(Ljava/io/Closeable;)V
    //   113: goto -30 -> 83
    //   116: astore 5
    //   118: aload_2
    //   119: invokestatic 74	com/TIEmulator/AssetHTMLView:closeStream	(Ljava/io/Closeable;)V
    //   122: aload 5
    //   124: athrow
    //   125: astore 5
    //   127: aload_3
    //   128: astore_2
    //   129: goto -11 -> 118
    //   132: astore 5
    //   134: aload_3
    //   135: astore_2
    //   136: goto -18 -> 118
    //   139: astore 12
    //   141: goto -35 -> 106
    //   144: astore 10
    //   146: aload_3
    //   147: astore_2
    //   148: goto -42 -> 106
    //
    // Exception table:
    //   from	to	target	type
    //   25	55	102	java/io/IOException
    //   86	99	102	java/io/IOException
    //   2	25	116	finally
    //   25	55	125	finally
    //   86	99	125	finally
    //   55	75	132	finally
    //   2	25	139	java/io/IOException
    //   55	75	144	java/io/IOException
  }

  protected static void refuse(Activity paramActivity)
  {
    paramActivity.finish();
  }

  static abstract interface HTMLViewerCb
  {
    public abstract void onAccept();
  }
}
